using System;

namespace PropertyGridEx
{
	 
	public class CustomItem
	{
 
		public int IntegerID=0;
		public string Description="";
        public string StringID = "";
        public string ClassName = "";
        public object Tag = null;
        public Guid UniqueID = Guid.Empty;
        public bool Selected = false;


        /// <summary>
        /// Creates a new <see cref="CustomItem"/> instance.  Used
        /// for populating listboxes and drop down lists.  Much faster
        /// than data binding.
        /// </summary>
		public CustomItem(int integerID,
                                   string description,
                                   bool selected)
		{
			 IntegerID=integerID;
             Description = CleanText(description);
             Selected = selected;
		}

        public CustomItem(Guid uniqueID,
                                    string description,
                                    bool selected)
        {
            UniqueID = uniqueID;
            Description = CleanText(description);
            Selected = selected;
        }

      
        public CustomItem(string stringID,
                                    string description,
                                    bool selected)
        {
            StringID = stringID;
            Description = CleanText(description);
            Selected = selected;
        }
 
        public CustomItem(string stringID,
                                    string description,
                                    bool selected,
                                    string className)
        {
            StringID = stringID;
            Description = CleanText(description);
            ClassName = className;
            Selected = selected;
        }
         

        public CustomItem(Guid uniqueID,
                                    string description,
                                    bool selected,
                                    string className)
        {
            UniqueID = uniqueID;
            Description = CleanText(description);
            ClassName = className;
            Selected = selected;
        }
 
        private string CleanText(string textToClean)
        {
            return textToClean.Replace("\r\n","");
        }

		public override string ToString()
		{
           return Description;
		}
	}
}

 

